<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<image>
	<url>{$rlTplBase}img/logo.png</url>
	<title>{$site_name|replace:'&':'&amp;'}</title>
	<link>{$smarty.const.RL_URL_HOME}</link>
</image>

{if isset($smarty.get.news)}
	<title>{$rss.title|replace:'&':'&amp;'}</title>
	<description>{$rss.description|replace:'&':'&amp;'}</description>
	<link>{$rlBase}{if $rss.path}{if $config.mod_rewrite}{$rss.path}.html{else}?page={$rss.path}{/if}{/if}</link>
	
	{foreach from=$news item='news_item'}
	<item>
		<title>{$news_item.title|replace:"&":"&amp;"}</title>
		<pubDate>{$news_item.Date|date_format:'%a, %d %b %Y %H:%M:%S GMT'}</pubDate>
		<link>{$rlBase}{if $config.mod_rewrite}{$pages.news}/{$news_item.path}.html{else}?page={$pages.news}&amp;id={$news_item.ID}{/if}</link>
		<description><![CDATA[{$news_item.content}]]></description>
		{$tplRssNewsItem}
	</item>
	{/foreach}
{else}
	<title>{$rss.title|replace:'&':'&amp;'}</title>
	<description>{if $rss.id}{$lang.listings_of_category|replace:'[category]':$rss.title|replace:'&':'&amp;'}{else}{$rss.title|replace:'&':'&amp;'}{/if}</description>
	<link>{$rlBase}{if $rss.path}{if $config.mod_rewrite}{$pages.browse}/{$rss.path}.html{else}?page={$pages.browse}&amp;id={$rss.id}{/if}{else}{if $config.mod_rewrite}{$pages.listings}.html{else}?page={$pages.listings}{/if}{/if}</link>
	
	{foreach from=$listings item='listing'}
	{if $listing.Listing_type}
		{assign var='listing_type' value=$listing_types[$listing.Listing_type]}
	{/if}
	
	<item>
		<title>{$listing.listing_title|replace:"&":"&amp;"}</title>
		<link>{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}</link>
		<pubDate>{$listing.Date|date_format:'%a, %d %b %Y %H:%M:%S GMT'}</pubDate>
		<category>{$listing.name|replace:'&':'&amp;'}</category>
		<description><![CDATA[
		<table cellpadding="0" cellspacing="0">
		<tr>
			{if !empty($listing.Main_photo)}
			<td valign="top">
				<a title="{$listing.listing_title}" {if $config.view_details_new_window}target="_blank"{/if} href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}">
					<img alt="{$listing.listing_title}" src="{$smarty.const.RL_URL_HOME}files/{$listing.Main_photo}" />
				</a>
			</td>
			<td width="10px">&nbsp;</td>
			{else}
			<td colspan="2"></td>
			{/if}
			<td valign="top">
				<table cellpadding="0" cellspacing="0">
				{foreach from=$listing.fields item='item' key='field' name='fListings'}
				{if !empty($item.value) && $item.Details_page}
				<tr>
					<td>{$item.name}:</td>
					<td width="10px"></td>
					<td>
						{if $f_first}
							<a title="{$item.value}" {if $config.view_details_new_window}target="_blank"{/if} href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}/{str2path string=$listing.listing_title}-{$listing.ID}.html{if $hl}?highlight{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;id={$listing.ID}{if $hl}&amp;highlight{/if}{/if}">{$item.value}</a>
						{else}
							{$item.value}
						{/if}
					</td>
				</tr>
				{assign var='f_first' value=false}
				{/if}
				{/foreach}
				<tr>
					<td>{$lang.category}:</td>
					<td></td>
					<td><a title="{$lang.category}: {$listing.name}" class="cat_caption" href="{$rlBase}{if $config.mod_rewrite}{$pages[$listing_type.Page_key]}/{$listing.Path}{if $listing_type.Cat_postfix}.html{else}/{/if}{else}?page={$pages[$listing_type.Page_key]}&amp;category={$listing.Category_ID}{/if}">{$listing.name}</a></td>
				</tr>
				
				{rlHook name='xmlListingsAfterFields'}
				
				</table>
			</td>
		</table>
		]]></description>
	</item>
	{/foreach}
{/if}

</channel>
</rss>